<?php
define('RootDir',str_replace("\\",'/',substr(__FILE__,0,strrpos(dirname(__FILE__),DIRECTORY_SEPARATOR)))); //获取网站目录
define('RootUrl',strlen(RootDir)==strlen($_SERVER['DOCUMENT_ROOT']) ? 'http://'.$_SERVER['HTTP_HOST'] : 'http://'.$_SERVER['HTTP_HOST'].substr(RootDir,strlen($_SERVER['DOCUMENT_ROOT'])));  //获取网站url